<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

<script type="text/javascript" src="../src/wildmatch.js"></script>
<script type="text/javascript" src="../src/collection.js"></script>
<script type="text/javascript" src="../src/WildUtils.js"></script>
<script type="text/javascript" src="../src/EventBus.js"></script>
<script type="text/javascript">

    EventBus.log("----log---");
    EventBus.listen("alert-me", function (args, event) {
        alert("me,app1,20,global, args: " + JSON.stringify(args));
    }, subscriberId = "app1", priority = 20, space = "global");
    EventBus.listen("alert-me", function (args, event) {
        alert("me,app1,p-5,global, args: " + JSON.stringify(args));
    }, "app3", 5, "global");

    EventBus.listen("alert-*", function (args, event) {
        alert("*,app2,10,default, args: " + JSON.stringify(args));
    }, "app2", 10, "default");

    EventBus.listenOnce("alert-*", function (args, event) {
        alert("i am listen once as alert-*,app2,10,default, args: " + JSON.stringify(args));
    }, "app2", 10, "default");

    EventBus.trigger("alert-me", "default", 1, null);
//    EventBus.trigger("alert-me", "*", 2, null);


</script>


</body>
</html>